FIR Filter Weights
socp
FICO-Xpress
AMPL
short
= 1;
var u >= 0;
minimize spread: t;
subject to passband_up_bnds {omega in OMEGA_PASS}:
2* sum {k in 0..n2-1} h[k]*cos((k-(n-1)/2)*omega) <= t;
subject to so: 4 + (u-t)^2 <= (u+t)^2;
subject to passband_lo_bnds {omega in OMEGA_PASS}:
u <= 2* sum {k in 0..n2-1} h[k]*cos((k-(n-1)/2)*omega);
subject to stopband_bnds {omega in OMEGA_STOP}:
-beta <= 2* sum {k in 0..n2-1} h[k]*cos((k-(n-1)/2)*omega) <= beta;
let t := 1;
solve;
display 20*log10(t);
]]>
This model finds the filter weights for a finite impulse response (FIR) filter.
Reference: "Applications of Second-Order Cone Programming",
M.S. Lobo, L. Vandenberghe, S. Boyd, and H. Lebret, 1998